﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HSDc.RingleFlow.Api.Kernel.Org;

namespace HSDc.RingleFlow.Kernel.DBPersit.DbOrg
{
    internal class Manager : Emp, IManager
    {
        internal Manager(string _Id, string _userId, string _Name, string _Email)
            : base(_Id, _userId, _Name, _Email)
        {
        }
        List<IDept> IManager.MainManagementDepartment
        {
            get { throw new NotImplementedException(); }
        }

        List<IDept> IManager.PartimeManagementDepartment
        {
            get { throw new NotImplementedException(); }
        }

        string IEmp.Id
        {
            get { return _Id; }
        }

        string IEmp.UserId
        {
            get { return _userId; }
        }

        string IEmp.Name
        {
            get { return _Name; }
        }

        string IEmp.Email
        {
            get { return _Email; }
        }

        IManager IEmp.DirectManager
        {
            get
            {
                RetrieveMainDepartment();
                return _dept[0].MainManager;
            }
        }

        IDept IEmp.MainDepartment
        {
            get
            {
                RetrieveMainDepartment();
                return _dept[0];
            }
        }

        List<IDept> IEmp.PartimeDepartment
        {
            get
            {
                RetrievePartimeDepartment();
                return _dept;
            }
        }
    }
}
